#!/bin/bash

INPUT_FOLDER=comp/
OUTPUT_FOLDER=decomp/

echo '----------------------------------------------------'
echo 'The files inside the folder' $INPUT_FOLDER 'will be decompress'
echo 'The decompress files will be put on' $OUTPUT_FOLDER
echo '----------------------------------------------------'

for i in `ls $INPUT_FOLDER`; do	
	output=$(echo $i | sed -e 's/.comp/decomp.bmp/')
	echo $i '->' $output
	./BMPcompress -d -i $INPUT_FOLDER$i -o $OUTPUT_FOLDER$output
	echo '----------------------------------------------------'
done
